package com.coder.shop.rpc.service.impl;

import com.coder.common.annotation.BaseService;
import com.coder.common.base.BaseServiceImpl;
import com.coder.shop.dao.mapper.ShopGoodsSkuMapper;
import com.coder.shop.dao.model.ShopGoodsSku;
import com.coder.shop.dao.model.ShopGoodsSkuExample;
import com.coder.shop.rpc.api.ShopGoodsSkuService;

import java.math.BigDecimal;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* ShopGoodsSkuService实现
* @Author liuzhimin
* @Date Created by liuzhimin on 2018/4/24.
* @Description
*/
@Service
@Transactional
@BaseService
public class ShopGoodsSkuServiceImpl extends BaseServiceImpl<ShopGoodsSkuMapper, ShopGoodsSku, ShopGoodsSkuExample> implements ShopGoodsSkuService {

    private static final Logger LOGGER = LoggerFactory.getLogger(ShopGoodsSkuServiceImpl.class);

    @Autowired
    ShopGoodsSkuMapper shopGoodsSkuMapper;

	@Override
	public List<ShopGoodsSku> categoryGoods(Integer typeId, String[] specs, BigDecimal startPrice, BigDecimal endPrice,
			Integer startPage, Integer pageSize, String orderColum, String sort) {
		return shopGoodsSkuMapper.categoryGoods(typeId, specs, startPrice, endPrice, startPage, pageSize, orderColum, sort);
	}

	@Override
	public Integer categoryGoodsCount(Integer typeId, String[] specs, BigDecimal startPrice, BigDecimal endPrice) {
		return shopGoodsSkuMapper.categoryGoodsCount(typeId, specs, startPrice, endPrice);
	}

}